package com.zsj.service_user.service.impl;

import com.zsj.service_user.entity.AppGoods;
import com.zsj.service_user.mapper.AppGoodsMapper;
import com.zsj.service_user.service.AppGoodsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author zsj
 * @since 2022-04-28
 */
@Service
public class AppGoodsServiceImpl extends ServiceImpl<AppGoodsMapper, AppGoods> implements AppGoodsService {


    @Autowired
    private AppGoodsService appGoodsService;

    @Override
    public boolean saveGoods(AppGoods appGoods) {
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        appGoods.setGoodsCreateTime(format.format(new Date()));
        return appGoodsService.save(appGoods);
    }
}
